From: Keir Fraser Date: Thu, 11 Mar 2010 08:09:58 +0000 (+0000) Subject: iommu: clear the iommu_* variables to 0 when iommu is not enabled. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12517 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=1803dc9556de65b65c870d6bbdd1acce9c1d8fe3;p=xen.git iommu: clear the iommu_* variables to 0 when iommu is not enabled. With "iommu=0" xen parameter, the 3 iommu_* variables are still left to the default value 1 -- this is misleading... Signed-off-by: Dexuan Cui --- diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 702d81afe9..ad988b2bcb 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -288,7 +288,12 @@ int iommu_setup(void) panic("IOMMU setup failed, crash Xen for security purpose!\n"); if ( !iommu_enabled ) + { iommu_pv_enabled = 0; + iommu_snoop = 0; + iommu_qinval = 0; + iommu_intremap = 0; + } printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis"); if ( iommu_enabled ) printk("I/O virtualisation for PV guests %sabled\n",